home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / external / callable / calltest_unix.txt next >
Encoding:
Text File  |  1997-07-08  |  2.2 KB  |  56 lines

  1.     calltest.c is a program that demonstrates how Callable IDL might
  2. be used. This file explains how to build and run it on a Unix platform.
  3.  
  4. The general approach is the same on all Unix systems: You must compile
  5. the source file (calltest.c) and then link it against the IDL sharable
  6. library and any system libraries required to complete the link. Although
  7. this is straightforward, the details of which libraries to use, and their
  8. locations, differ.
  9.  
  10. The Unix IDL distribution contains a directory named "bin" that contains
  11. the executables for idl and its related programs. For every supported
  12. operating system / hardware architecture supported by your installation,
  13. you will find a subdirectory containing the platform specific binaries for
  14. that system. For example, platform specific support for Solaris2 running
  15. on Sparc hardware is found in $IDL_DIR/bin/bin.solaris2.sparc. Each of
  16. these directories contains a makefile that shows how to relink IDL. This
  17. makefile also contains a rule to build calltest. To understand how calltest
  18. is built (and therefore how to link other callable IDL programs) you should
  19. read this makefile.
  20.  
  21.  
  22. BUILDING CALLTEST:
  23. ------------------
  24.  
  25.    The following instructions include example statements that show how
  26. to build calltest. These examples assume that you have an environment
  27. variable named "IDL_DIR" that points to the root of the IDL installation
  28. of your system, you are running /bin/csh or a compatible shell, and you
  29. wish to build calltest for Solaris2 on Sparc hardware. If your situation
  30. differs, you will need to adjust these statements accordingly:
  31.  
  32.     (1) Create an empty scratch directory to build calltest in.
  33.  
  34.         % mkdir ~/calltest
  35.         % cd ~/calltest
  36.  
  37.     (2) Copy the makefile to your new empty directory.
  38.  
  39.         % cp $IDL_DIR/bin/bin.solaris2.sparc/Makefile .
  40.  
  41.     (3) Build calltest.
  42.  
  43.         % make calltest
  44.  
  45.     (4) To run calltest on many systems, you will need to add the
  46.         IDL architecture specific bin directory to your dynamic library
  47.         search path. Under most Unixes, this is LD_LIBRARY_PATH. Under AIX
  48.         it is LIBPATH, and under HP-UX it is SHLIB_PATH.
  49.  
  50.         % setenv LD_LIBRARY_PATH \
  51.                  $IDL_DIR/bin/bin.solaris2.sparc:$LD_LIBRARY_PATH
  52.  
  53.     (5) Run it.
  54.  
  55.         % ./calltest
  56.